<?php include 'header.php' ?>
    <div id="dialog" title="Xác nhận">
        <p> Bạn chắc chắn muốn xóa?</p>
        <button onclick="deleteCategory();">Có</button>
        <button onclick="closeDialog()">Không</button>
    </div>

    <article>
        <div class="clear"/>

        <section class="list-content">
            <div class="giohang">
                Quản lý danh mục
            </div>
            <div id="category_form">
                <p id="message"></p>

                <form action="">
                    <input type="hidden" id="id_cat">
                    <table>
                        <tr>
                            <td><label for="cat_name">Tên: </label></td>
                            <td><input type="text" id="cat_name" name="cat_name" maxlength="100"
                                       placeholder="tên danh mục" required="true" autofocus="true"></td>
                        </tr>
                        <tr>
                            <td><label for="image_url">Ảnh bìa: </label></td>
                            <td><input type="text" id="image_url" name="image_url" placeholder="chọn ảnh bìa"
                                       value="../images/summer-collection.jpg" size="50" disabled="disabled">
                                <input type="button" value="Chọn file" onclick="browserImage();"/></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><input type="submit" value="Lưu lại" onclick="createNewCategory();return false;"
                                       style="width: 100px"></td>
                        </tr>
                    </table>
                </form>
                <br>

                <div class="clear"/>
            </div>
        </section>

        <section class="list-content">
            <div id="category_list">
            </div>
            <div class="clear"/>
        </section>

        <div class="clear"/>
    </article>

<?php include 'footer.php' ?>